function main(params) {
    const self = this;
    const pageRootList = self.$$roots();

    api.EXEC_FORMULA("TREE_QUERY_CHILDRENS('7bec4420-5109-4cfb-896e-c40178c7022e','" + params.id + "',['id','node_type'])").then((res) => {

        let unitIds = res.result
            .filter(item => item.node_type === "unit")
            .map(item => item.id);

        unitIds = unitIds.length ? unitIds : ['-1'];

        let rootPageElement = pageRootList[0];
        // 找到页面中的列表组件元素
        let pageTableList = rootPageElement.$$element("page_widget_list_7o4tst");
        if (pageTableList) {
            if (pageTableList.dataEngine && pageTableList.dataEngine.state) {
                pageTableList.$children[0].$$setExtraParams({
                    humanTypeCode: '1'
                })

                let queryElement = pageTableList.dataEngine.state.getElement("query_field_wrapper_faappn");
                if (queryElement && queryElement.data && queryElement.data.members) {
                    const queryProjectIdModel = queryElement.data.members[0];
                    queryProjectIdModel.props.defaultValue.value = unitIds;
                }
                let tableCondition = pageTableList.dataEngine.state.getElement("condition_de5q35");
                if (tableCondition) {
                    tableCondition.onQuery();
                }
            }
        }
    }).catch(err => {
        self.$message.error(err.message); // 显示错误提示信息
    });
}
